<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html> 
<head>
<link href="../../css/loginStyle.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	    <script type='text/javascript' src="<%=request.getContextPath()%>/dwr/engine.js"></script>
		<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>

<script type="text/javascript">
			djConfig = {
				isDebug: false,
				parseOnLoad: true,
				parseWidgets:false,
				searchIds:[]
			};
	    </script>
		<script type="text/javascript" src="../../lib/dojo/dojo.js"></script>
		<script>
	    dojo.require("comba.component.Security");
	    dojo.require("comba.component.HMSToolkit");
	    var HMSRest=new comba.component.Rest();
	    //此变量在main.jsp中有定义.
	    var HMSSecurity=new comba.component.Security();
	    //当前可用的授权有:
	    //FEMTO_CONF	   Femto 配置管理
		//FEMTO_ALARM	   Femto 告警管理
		//FEMTO_PM	       Femto 性能管理
		//FEMTO_SOFTWARE   Femto 软件管理
		//FEMTO_TASK	   Femto 系统管理
		//HMSSecurity.QueryUsabledAuth函数返回一个可用授权的列表
		//在客户代码中只需执行下面Button中的onclick事件的函数即可.调用时需传入你要验证的授权名称,如FEMTO_CONF,FEMTO_PM等.
		
		function aa()
	    {
			v = HMSSecurity.QueryUsabledAuth(['aa','FEMTO_CONF','FEMTO_SOFTWARE']);
			
			for (i=0;i<v.length;++i)
			{
				alert(v[i]);
			}
		}
</script>
</head>
 <body  > 
 <!-- onLoad="dwr.util.useLoadingMessage();dwr.engine.setActiveReverseAjax(true);"  -->
 <form id="loginForm" onsubmit="return submitForm();" action="data.php"> 
	 <input type="text" name="id" id="loginName"/> 
	 <input type="password" name="pwd" /> 
	 <!--//HMSRest.AjaxGet('/hms/service/user/forceLogout/AS',function(resp,ioArgs){},function(error,ioArgs){}); -->
	 <input type="button" name="sub" value="submit" onclick="aa();"/> 
 </form> 
			Browser.withAllSessions(new Runnable() {
				@Override
				public void run() {
					Util.setStyle("commConnectState", "display", "");
				}
			});
 
 </body> 
 </html>
